<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html class="no-js" lang="zxx">
<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="ie=edge">
    <title>Shop | eCommers</title>
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" type="image/x-icon"
          href="${pageContext.request.contextPath}/shop/assets/img/icon/favicon.png">

    <jsp:include page="${pageContext.request.contextPath}/common/css.jsp"></jsp:include>
</head>
<body>
<jsp:include page="${pageContext.request.contextPath}/common/Header.jsp"></jsp:include>
<main>
    <section class="checkout_area">
        <div class="returning_customer">
            <div class="cupon_area">
                <div class="row">
                    <form action="${pageContext.request.contextPath}/order/submitOrder.action" method="post">
                        <div class="col-lg-4" style="margin: 0 auto;width: 1200px">

                            <div class="order_box">
                                <h2>Your Order</h2>
                                <ul class="list">
                                    <li>
                                        <a href="#">Product<span>Total</span>
                                        </a>
                                    </li>
                                    <c:forEach items="${cartEntryList}" var="shopCart">
                                        <li>
                                            <a href="#">${shopCart.product.productName}
                                                <span>￥${shopCart.product.price}</span>
                                            </a>
                                        </li>
                                    </c:forEach>
                                </ul>
                                <ul class="list list_2">
                                    <li>
                                        <c:set var="sum" value="0"></c:set>
                                        <c:forEach items="${cartEntryList}" var="row" varStatus="status">
                                            <c:set var="sum" value="${sum+(row.product.price*row.count)}"></c:set>
                                        </c:forEach>
                                        <a href="#">总价<span>￥${sum}</span>
                                        </a>
                                    </li>
                                </ul>
                                <div class="payment_item active" style="background-color: white">
                                    <ul class="list list_2">
                                        <li>
                                            <a href="#">购买用户<span>${user.username}</span>
                                            </a>
                                        </li>
                                    </ul>
                                </div>
                                <div class="payment_item active">

                                    <span>
        	                        <h2>选择收货地址</h2>
                                        <select name="address" selected="selected">
                                        <c:forEach items="${addressList}" var="address">
                                            <option value="${address}">${address}</option>
                                        </c:forEach>
                                        </select>

                                    <p>订单号：123456789</p>
                                    </span>

                                </div>
                                <div class="creat_account checkout-cap" style="margin:0 auto">
                                    <input type="checkbox" id="f-option8" name="selector"/>
                                    <label for="f-option8">I’ve read and accept the <a href="#">terms & conditions*</a>
                                    </label>
                                </div>
                                <input style="margin:0 auto" class="btn w-100" type="submit" value="Proceed to Paypal" id="hello">
                                <%--
                                                                <a class="btn w-100" href="#">Proceed to Paypal</a>
                                --%>
                            </div>
                        </div>
                    </form>

                </div>
            </div>
        </div>
    </section>

    <!--End Checkout Area -->
</main>
<jsp:include page="${pageContext.request.contextPath}/common/Foot.jsp"></jsp:include>
<jsp:include page="${pageContext.request.contextPath}/common/js.jsp"></jsp:include>
</body>
</html>